window.API = {
	test: function() {
		alert('test: ' + $('#frame').length);
	}
}

if (window.parent === window) {
	$.expose(API.test);
}